package com.gitee.service.openapi;

import io.netty.handler.codec.http.HttpResponseStatus;

public class OperationException extends RuntimeException {

    int statusCode;

    public OperationException(int statusCode, String message) {
        super(message);
        this.statusCode = statusCode;
    }

    public OperationException(HttpResponseStatus statusCode, String message) {
        super(message);
        this.statusCode = statusCode.code();
    }

    public OperationException(HttpResponseStatus statusCode, String message, Throwable cause) {
        super(message, cause);
        this.statusCode = statusCode.code();
    }

    public int getStatusCode() {
        return statusCode;
    }

}
